-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Acquisition Rate of planar mode is not used #145
Conversation
if isinstance(scanning_settings, SinglePlaneSettings): | ||
inter_plane = 1 | ||
else: | ||
scan_length = ( | ||
scanning_settings.piezo_scan_range[1] | ||
- scanning_settings.piezo_scan_range[0] | ||
) | ||
inter_plane = scan_length / scanning_settings.n_planes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inside get_voxel_size
:
checks if the scanning_settings are single_plane_settings and if so sets the z_voxel size to 1
n_planes = scanning_settings.n_planes - ( | ||
scanning_settings.n_skip_start + scanning_settings.n_skip_end | ||
) | ||
if isinstance(scanning_settings, SinglePlaneSettings): | ||
n_planes = 0 | ||
else: | ||
n_planes = scanning_settings.n_planes - ( | ||
scanning_settings.n_skip_start + scanning_settings.n_skip_end | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inside convert_save_params
checks if the settings are for planar mode, and if so, sets n_planes to 0
if self.global_state == GlobalState.PLANAR_PREVIEW: | ||
save_p = convert_save_params( | ||
self.save_settings, | ||
self.single_plane_settings, | ||
self.camera_settings, | ||
self.trigger_settings, | ||
) | ||
else: | ||
save_p = convert_save_params( | ||
self.save_settings, | ||
self.volume_setting, | ||
self.camera_settings, | ||
self.trigger_settings, | ||
) | ||
return save_p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inside save_params
checks if we are in planar mode and returns the planar settings - if not defaults to volume settings
Pull Request Test Coverage Report for Build 2746868032Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Let's keep TLDR keep |
By the way that diagram is super cool. Which tool did you use? |
I would say that the defaults you use would depend on the saving format.
|
Thanks 👍 😄 |
Since there have been no comments in the last two years and the PR seems to work I'll merge it. |
Here's a simple fix to the second problem listed in #144.
The Issue
changing the parameter regarding the how many planes per second should be recorded doesn't update the saving parameter values
The top bar gui receive the info to display (number of volumes) from the save_status inside state.py
The save_status is changed in the stacksaver using the received save_params
the save_params is a property of the state which converts the appropriate settings in saving parameters
Now, the problem relies in the fact that
save_params
and the functionconvert_save_params
only accepted/usedZRecordingSettings
to extract the scanning_settings.This works well for volumetric mode but fails to account for any changes in the single_plane_settings.
The Solution
I changed three functions:
save_params
to determine whether it's planar or volumetric mode and pass toconvert_save_params
the appropriate settings (the default is volumetric)convert_save_params
to accept and correctly extract information from both volume_settings and single_plane_settings (in particular -> n_planes is set to 0 if in planar mode)get_voxel_size
to compute a voxel size even in planar_mode -> z voxel is left at 1What's left
I'd like to hear some feedback regarding two main values:
n_planes
which is set to 0 in planar_mode -> maybe it could be better to set it to None?voxel size
for the z axis in planar mode is set to 1 -> or maybe it should only return a tuple of 2 values if it's planar mode?